package com.b.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
    * 视频-标签关联表
    */
@Document(indexName = "videotagrelation")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class VideoTagRelation implements java.io.Serializable {
    @Id
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer id;
    /**
    * 视频ID
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer videoId;

    /**
    * 标签ID
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer tagId;

    public VideoTagRelation(Integer videoId, Integer tagId) {
        this.videoId = videoId;
        this.tagId = tagId;
    }
}